<!--
 * @Author: 宋杰
 * @Date: 2021-03-15 17:40:35
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-03-17 19:12:24
 * @Description: 一家十一口(猜一字)左上轮播 重写
-->
<template>
  <div class="DivBox">
    <div class="DivBox_Con">
      <!-- 标签 -->
      <div class="titleBox">
        <div>实时放、还款信息</div>
      </div>
      <!-- 轮播 -->
      <div class="Con_box">
        <div class="Con_box_top">
          <div>用户ID</div>
          <div>类型</div>
          <div>金额(元)</div>
          <div>地区</div>
        </div>
        <div class="Con_box_con">
          <vue-seamless-scroll :data="dataList" class="Con_box_con2">
            <ul class="item">
              <li
                v-for="(item, index) in dataList"
                :key="index"
                :class="item.operation == '还款' ? '' : 'color2'"
              >
                <!-- 电话 -->
                <span class="title" v-text="item.phone"></span>
                <!-- 类型 -->
                <span class="date" v-text="item.type"></span>
                <!-- 金额 -->
                <span class="date" v-text="item.Amount"></span>
                <!-- 地区 -->
                <span class="date" v-text="item.address"></span>
                <!-- 电话 -->
                <!-- <span class="title" v-text="item.tell"></span> -->
                <!-- 类型 -->
                <!-- <span class="date" v-text="item.type"></span> -->
                <!-- 金额 -->
                <!-- <span class="date" v-text="item.amount"></span> -->
                <!-- 地区 -->
                <!-- <span class="date" v-text="item.area"></span> -->
              </li>
            </ul>
          </vue-seamless-scroll>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
//import {} from '';
export default {
  name: "",
  data() {
    return {
      // 贷款还款
      loanRepayment: [],
      dataList: [
        {
          id: 0,
          phone: "139****9150",
          type: "自营平台放款",
          Amount: "放款6000.00",
          address: "江苏省",
        },
        {
          id: 1,
          phone: "180****3152",
          type: "自营平台放款",
          Amount: "放款11000.00",
          address: "江苏省",
        },
        {
          id: 2,
          phone: "137****7670",
          type: "蚂蚁金融还款",
          Amount: "还款5002.00",
          address: "上海市",
          operation:"还款"
        },
        {
          id: 3,
          phone: "156****8513",
          type: "自营平台放款",
          Amount: "放款3000.00",
          address: "江苏省",
        },
        {
          id: 4,
          phone: "180****3365",
          type: "自营平台放款",
          Amount: "放款1000.00",
          address: "江苏省",
        },
        {
          id: 5,
          phone: "133****1532",
          type: "京东金融放款",
          Amount: "放款5000.00",
          address: "江苏省",
        },
        {
          id: 6,
          phone: "185****9680",
          type: "自营平台还款",
          Amount: "还款1008.00",
          address: "浙江省",
          operation:"还款"
        },
        {
          id: 7,
          phone: "188****7438",
          type: "自营平台还款",
          Amount: "还款10005.00",
          address: "江苏省",
          operation:"还款"
        },
        {
          id: 8,
          phone: "171****4390",
          type: "滴滴金融放款",
          Amount: "放款1000.00",
          address: "安徽省",
        },
        {
          id: 9,
          phone: "181****6751",
          type: "京东金融放款",
          Amount: "放款7000.00",
          address: "上海市",
        },
        {
          id: 10,
          phone: "139****6585",
          type: "自营平台还款",
          Amount: "还款1007.50",
          address: "江苏省",
          operation:"还款"
        },
        {
          id: 11,
          phone: "150****2648",
          type: "自营平台还款",
          Amount: "放款5000.00",
          address: "福建省",
          operation:"还款"
        },
        {
          id: 12,
          phone: "153****2576",
          type: "蚂蚁金融还款",
          Amount: "放款2000.00",
          address: "浙江省",
          operation:"还款"
        },
        {
          id: 13,
          phone: "130****1347",
          type: "京东金融放款",
          Amount: "放款3000.00",
          address: "江苏省",
        },
        {
          id: 14,
          phone: "180****4228",
          type: "自营平台放款",
          Amount: "放款1000.00",
          address: "江苏省",
        },
        {
          id: 15,
          phone: "180****4228",
          type: "自营平台放款",
          Amount: "放款1000.00",
          address: "江苏省",
        },
        {
          id: 16,
          phone: "150****5685",
          type: "自营平台放款",
          Amount: "还款500.25",
          address: "辽宁省",
        },
        {
          id: 17,
          phone: "137****1608",
          type: "小米金融放款",
          Amount: "放款7000.00",
          address: "上海市",
        },
        {
          id: 18,
          phone: "152****7425",
          type: "自营平台放款",
          Amount: "放款1000.00",
          address: "上海市",
        },
        {
          id: 19,
          phone: "181****7866",
          type: "滴滴金融放款",
          Amount: "放款2500.00",
          address: "江苏省",
        },
        {
          id: 20,
          phone: "171****6806",
          type: "蚂蚁金融还款",
          Amount: "放款8000.00",
          address: "江苏省",
          operation:"还款"
        },
        {
          id: 21,
          phone: "132****0923",
          type: "自营平台放款",
          Amount: "放款2000.00",
          address: "河北省",
        },
        {
          id: 22,
          phone: "170****7965",
          type: "自营平台放款",
          Amount: "还款503.75",
          address: "江苏省",
        },
        {
          id: 23,
          phone: "166****9465",
          type: "小米金融放款",
          Amount: "放款1300.00",
          address: "江苏省",
        },
        {
          id: 24,
          phone: "188****3470",
          type: "自营平台放款",
          Amount: "放款700.00",
          address: "江苏省",
        },
        {
          id: 25,
          phone: "151****2396",
          type: "自营平台放款",
          Amount: "放款10000.00",
          address: "浙江省",
        },
        {
          id: 26,
          phone: "138****0528",
          type: "滴滴金融还款",
          Amount: "还款1000.00",
          address: "上海市",
          operation:"还款"
        },
        {
          id: 27,
          phone: "181****1580",
          type: "自营平台放款",
          Amount: "放款5000.00",
          address: "江苏省",
        },
        {
          id: 28,
          phone: "159****3836",
          type: "自营平台放款",
          Amount: "还款650.33",
          address: "安徽省",
        },
        {
          id: 29,
          phone: "138****4330",
          type: "蚂蚁金融还款",
          Amount: "放款900.00",
          address: "上海市",
          operation:"还款"
        },
        {
          id: 30,
          phone: "138****4330",
          type: "蚂蚁金融还款",
          Amount: "放款900.00",
          address: "上海市",
          operation:"还款"
        },
        {
          id: 31,
          phone: "186****4026",
          type: "自营平台放款",
          Amount: "放款1300.00",
          address: "江苏省",
        },
        {
          id: 32,
          phone: "156****3590",
          type: "自营平台放款",
          Amount: "还款1500.00",
          address: "江苏省",
        },
      ],
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {
    this.getData();
  },
  //方法集合
  methods: {
    getData() {
      this.$fetch("/asset/queryAll")
        .then((res) => {
          console.log("贷款还款res", res);
          if (res.code === 0) {
            this.loanRepayment = res.datas;
            console.log("this.loanRepayment", this.loanRepayment);
          }
        })
        .catch((err) => {
          console.log("贷款还款err", err);
        });
    },
  },
};
</script>
<style lang="scss" scoped>
.color2 {
  > span {
    color: #f44765 !important;
  }
}
.DivBox {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.DivBox_Con {
  // padding: 0 0.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.titleBox {
  font-family: PingFangSC-Regular;
  font-size: 0.3rem;
  color: #75bdff;
  letter-spacing: 0.015rem;
  text-align: left;
  line-height: 0.5rem;
  height: 0.5rem;
  width: 100%;
  background: url("../../assets/heng2.png") no-repeat;
  background-size: 100% 40%;
  background-position: right 0 bottom 0;
  margin-bottom: 0.05rem;
}
.Con_box {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  // border: 1px solid #b8d6f1;
  .Con_box_top {
    display: flex;
    align-items: center;
    height: 0.4rem;
    background: rgba($color: #067ae5, $alpha: 0.2);
    > div {
      width: 25%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: PingFangSC-Regular;
      font-size: 0.2rem;
      color: #129bff;
      letter-spacing: 0;
    }
  }
  .Con_box_con {
    padding: 0.2rem 0;
    flex: 1;
    width: 100%;
    .Con_box_con2 {
      // border: 1px solid #067ae5;
      width: 100%;
      height: 100%;
      overflow: hidden;
      .item li {
        // border: 1px solid #067ae5;
        height: 0.625rem;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        span {
          flex: 1;
          width: 100%;
          text-align: center;
          line-height: 0.625rem;
          font-family: PingFangSC-Regular;
          font-size: 0.2rem;
          color: #31fbfb;
          letter-spacing: 0;
        }
      }
    }
  }
}
</style>
